Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
"Can't bind to (...)" and "(...) is not a known element" JS errors when Angular app rendered within a Liferay portlet

I have an Angular 9 app that I would like to make accessible via Liferay 7.x portlet.

When I follow these steps, deploy my portlet and try to render it, I run into issues (reported as JavaScript errors in the browser console):

A. "Can't bind to 'X' since it isn't a known property of 'Y'.

B. "'X' is not a known element:

  1. If 'X' is an Angular component, then verify that it is part of this module.
  2. If 'X' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message." The problem is that as far as I can see the modules in question are properly annotated and listed as exports, declarations, etc.

I would appreciate help with resolving these issues. I am happy to jump on a Zoom to demonstrate the details of my config.

Thank you!

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You can find the answer here: https://angular.io/guide/ngmodule-faq#what-does-cant-bind-to-x-since-it-isnt-a-known-property-of-y-mean

What does "Can't bind to 'x' since it isn't a known property of 'y'" mean? This error often means that you haven't declared the directive "x" or haven't imported the NgModule to which "x" belongs.

Perhaps you declared "x" in an application sub-module but forgot to export it. The "x" class isn't visible to other modules until you add it to the exports list.

about 4 years ago · Juan Pablo Isaza Relatório

0

My problems were related to the fact that:

  1. The these steps ask to remove "selector" properties, which is incorrect. When I restored the "selector" properties the problem #1 went away
  2. I was ineed missing some module references (problem #2)

Hopefully this helps others, too.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda